<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			#box1,#box2{
				width: 200px;
				height: 300px;
				border: 3px solid blueviolet;
				float: left;
				margin-left: 100px;
				font-size: 100px;
				overflow: auto;
			}
		</style>
		
	</head>
	<body>
		<div id="box1"></div>
		<div id="box2"></div>
		<script>
			//获取显示区域
			var box1 = document.getElementById("box1");
			var box2 = document.getElementById("box2");
			var doubleStr="";
			var singleStr="";
			for(var i=0;i<100;i++){
				if(i%2==0){
			        doubleStr += (i+"\n");
				}else{
					singleStr += (i+ "\n");
				}
			}
			box1.innerText = doubleStr;
			box2.innerText = singleStr;
			/*for(var i=0;i<100;i++){
				if(i%2==0){
					box1.innerHTML += ; 
				}else{
					//box2.innerHtml += 
				}
			}*/
		</script>
	</body>
</html>
